<?php /* Custom template file for news feed form */?>
<?php echo $header; ?>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<div class="box">
  <div class="left"></div>
  <div class="right"></div>
  <div class="heading">
    <h1 style="background-image: url('view/image/shipping.png');"><?php echo $heading_title; ?></h1>
    <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
  </div>
  <div class="content">
    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
	
	<table class="form">
        <tr>
			<?php // Attribute name ?>
			<td><span class="required">*</span> <?php echo $entry_name; ?></td>
			<td><input name="name" value="<?php echo $name; ?>"/>
			<?php if ($error_name) { ?>
              <span class="error"><?php echo $error_name; ?></span>
              <?php } ?>
			</td>
		    
        </tr>
		<tr>
			<?php // Default value ?>
			<td><?php echo $entry_default_value; ?></td>
			<td><input name="author" value="<?php echo $default_value; ?>"/></td>
		</tr>
		<tr>
			<?php // Data type ?>
			<td><?php echo $entry_data_type; ?></td>
			<td><input name="author" value="<?php echo $data_type; ?>"/></td>
		</tr>
		<tr>
			<?php // Description ?>
			<td><?php echo $entry_description; ?></td>
			<td><textarea name="description" rows="1" cols="125"><?php echo $description; ?></textarea></td>
		</tr>
		</table>

    </form>
  </div>
</div>
<script language="javascript" type="text/javascript"><!--
function limitText(limitField, limitCountDisplay, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		document.getElementById(limitCountDisplay).innerHTML = limitNum - limitField.value.length;
	}
}
//--></script>
<?php /*
<script type="text/javascript" src="view/javascript/jquery/ui/ui.draggable.js"></script>
<script type="text/javascript" src="view/javascript/jquery/ui/ui.resizable.js"></script>
<script type="text/javascript" src="view/javascript/jquery/ui/ui.dialog.js"></script>
<script type="text/javascript" src="view/javascript/jquery/ui/external/bgiframe/jquery.bgiframe.js"></script>
<script type="text/javascript"><!--
function image_upload(field, preview) {
	$('#dialog').remove();
	
	$('#content').prepend('<div id="dialog" style="padding: 3px 0px 0px 0px;"><iframe src="index.php?route=common/filemanager&field=' + encodeURIComponent(field) + '" style="padding:0; margin: 0; display: block; width: 100%; height: 100%;" frameborder="no" scrolling="auto"></iframe></div>');
	
	$('#dialog').dialog({
		title: '<?php echo $text_image_manager; ?>',
		close: function (event, ui) {
			if ($('#' + field).attr('value')) {
				$.ajax({
					url: 'index.php?route=common/filemanager/image',
					type: 'POST',
					data: 'image=' + encodeURIComponent($('#' + field).val()),
					dataType: 'text',
					success: function(data) {
						$('#' + preview).replaceWith('<img src="' + data + '" alt="" id="' + preview + '" style="border: 1px solid #EEEEEE;" />');
					}
				});
			}
		},	
		bgiframe: false,
		width: 700,
		height: 400,
		resizable: false,
		modal: false
	});
};
//--></script>
*/ ?>
<?php echo $footer; ?>